3.285 \(\int \cos ^6(e+f x) (a+b \sin ^2(e+f x)) \, dx\)

Optimal. Leaf size=109 \[ \frac{(8 a+b) \sin (e+f x) \cos ^5(e+f x)}{48 f}+\frac{5 (8 a+b) \sin (e+f x) \cos ^3(e+f x)}{192 f}+\frac{5 (8 a+b) \sin (e+f x) \cos (e+f x)}{128 f}+\frac{5}{128} x (8 a+b)-\frac{b \sin (e+f x) \cos ^7(e+f x)}{8 f} \]

[Out]

(5*(8*a + b)*x)/128 + (5*(8*a + b)*Cos[e + f*x]*Sin[e + f*x])/(128*f) + (5*(8*a + b)*Cos[e + f*x]^3*Sin[e + f*
x])/(192*f) + ((8*a + b)*Cos[e + f*x]^5*Sin[e + f*x])/(48*f) - (b*Cos[e + f*x]^7*Sin[e + f*x])/(8*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0645058, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {3191, 385, 199, 203} \[ \frac{(8 a+b) \sin (e+f x) \cos ^5(e+f x)}{48 f}+\frac{5 (8 a+b) \sin (e+f x) \cos ^3(e+f x)}{192 f}+\frac{5 (8 a+b) \sin (e+f x) \cos (e+f x)}{128 f}+\frac{5}{128} x (8 a+b)-\frac{b \sin (e+f x) \cos ^7(e+f x)}{8 f} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^6*(a + b*Sin[e + f*x]^2),x]

[Out]

(5*(8*a + b)*x)/128 + (5*(8*a + b)*Cos[e + f*x]*Sin[e + f*x])/(128*f) + (5*(8*a + b)*Cos[e + f*x]^3*Sin[e + f*
x])/(192*f) + ((8*a + b)*Cos[e + f*x]^5*Sin[e + f*x])/(48*f) - (b*Cos[e + f*x]^7*Sin[e + f*x])/(8*f)

Rule 3191

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (In
tegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[p]
)

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \cos ^6(e+f x) \left (a+b \sin ^2(e+f x)\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \frac{a+(a+b) x^2}{\left (1+x^2\right )^5} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{b \cos ^7(e+f x) \sin (e+f x)}{8 f}+\frac{(8 a+b) \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right )^4} \, dx,x,\tan (e+f x)\right )}{8 f}\\ &=\frac{(8 a+b) \cos ^5(e+f x) \sin (e+f x)}{48 f}-\frac{b \cos ^7(e+f x) \sin (e+f x)}{8 f}+\frac{(5 (8 a+b)) \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{48 f}\\ &=\frac{5 (8 a+b) \cos ^3(e+f x) \sin (e+f x)}{192 f}+\frac{(8 a+b) \cos ^5(e+f x) \sin (e+f x)}{48 f}-\frac{b \cos ^7(e+f x) \sin (e+f x)}{8 f}+\frac{(5 (8 a+b)) \operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{64 f}\\ &=\frac{5 (8 a+b) \cos (e+f x) \sin (e+f x)}{128 f}+\frac{5 (8 a+b) \cos ^3(e+f x) \sin (e+f x)}{192 f}+\frac{(8 a+b) \cos ^5(e+f x) \sin (e+f x)}{48 f}-\frac{b \cos ^7(e+f x) \sin (e+f x)}{8 f}+\frac{(5 (8 a+b)) \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{128 f}\\ &=\frac{5}{128} (8 a+b) x+\frac{5 (8 a+b) \cos (e+f x) \sin (e+f x)}{128 f}+\frac{5 (8 a+b) \cos ^3(e+f x) \sin (e+f x)}{192 f}+\frac{(8 a+b) \cos ^5(e+f x) \sin (e+f x)}{48 f}-\frac{b \cos ^7(e+f x) \sin (e+f x)}{8 f}\\ \end{align*}

Mathematica [A]  time = 0.311012, size = 87, normalized size = 0.8 \[ \frac{48 (15 a+b) \sin (2 (e+f x))+24 (6 a-b) \sin (4 (e+f x))+16 a \sin (6 (e+f x))+960 a e+960 a f x-16 b \sin (6 (e+f x))-3 b \sin (8 (e+f x))+120 b f x}{3072 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]^6*(a + b*Sin[e + f*x]^2),x]

[Out]

(960*a*e + 960*a*f*x + 120*b*f*x + 48*(15*a + b)*Sin[2*(e + f*x)] + 24*(6*a - b)*Sin[4*(e + f*x)] + 16*a*Sin[6
*(e + f*x)] - 16*b*Sin[6*(e + f*x)] - 3*b*Sin[8*(e + f*x)])/(3072*f)

________________________________________________________________________________________

Maple [A]  time = 0.046, size = 112, normalized size = 1. \begin{align*}{\frac{1}{f} \left ( b \left ( -{\frac{\sin \left ( fx+e \right ) \left ( \cos \left ( fx+e \right ) \right ) ^{7}}{8}}+{\frac{\sin \left ( fx+e \right ) }{48} \left ( \left ( \cos \left ( fx+e \right ) \right ) ^{5}+{\frac{5\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{4}}+{\frac{15\,\cos \left ( fx+e \right ) }{8}} \right ) }+{\frac{5\,fx}{128}}+{\frac{5\,e}{128}} \right ) +a \left ({\frac{\sin \left ( fx+e \right ) }{6} \left ( \left ( \cos \left ( fx+e \right ) \right ) ^{5}+{\frac{5\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}}{4}}+{\frac{15\,\cos \left ( fx+e \right ) }{8}} \right ) }+{\frac{5\,fx}{16}}+{\frac{5\,e}{16}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x)

[Out]

1/f*(b*(-1/8*sin(f*x+e)*cos(f*x+e)^7+1/48*(cos(f*x+e)^5+5/4*cos(f*x+e)^3+15/8*cos(f*x+e))*sin(f*x+e)+5/128*f*x
+5/128*e)+a*(1/6*(cos(f*x+e)^5+5/4*cos(f*x+e)^3+15/8*cos(f*x+e))*sin(f*x+e)+5/16*f*x+5/16*e))

________________________________________________________________________________________

Maxima [A]  time = 1.45466, size = 165, normalized size = 1.51 \begin{align*} \frac{15 \,{\left (f x + e\right )}{\left (8 \, a + b\right )} + \frac{15 \,{\left (8 \, a + b\right )} \tan \left (f x + e\right )^{7} + 55 \,{\left (8 \, a + b\right )} \tan \left (f x + e\right )^{5} + 73 \,{\left (8 \, a + b\right )} \tan \left (f x + e\right )^{3} + 3 \,{\left (88 \, a - 5 \, b\right )} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{8} + 4 \, \tan \left (f x + e\right )^{6} + 6 \, \tan \left (f x + e\right )^{4} + 4 \, \tan \left (f x + e\right )^{2} + 1}}{384 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x, algorithm="maxima")

[Out]

1/384*(15*(f*x + e)*(8*a + b) + (15*(8*a + b)*tan(f*x + e)^7 + 55*(8*a + b)*tan(f*x + e)^5 + 73*(8*a + b)*tan(
f*x + e)^3 + 3*(88*a - 5*b)*tan(f*x + e))/(tan(f*x + e)^8 + 4*tan(f*x + e)^6 + 6*tan(f*x + e)^4 + 4*tan(f*x +
e)^2 + 1))/f

________________________________________________________________________________________

Fricas [A]  time = 1.94567, size = 205, normalized size = 1.88 \begin{align*} \frac{15 \,{\left (8 \, a + b\right )} f x -{\left (48 \, b \cos \left (f x + e\right )^{7} - 8 \,{\left (8 \, a + b\right )} \cos \left (f x + e\right )^{5} - 10 \,{\left (8 \, a + b\right )} \cos \left (f x + e\right )^{3} - 15 \,{\left (8 \, a + b\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{384 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x, algorithm="fricas")

[Out]

1/384*(15*(8*a + b)*f*x - (48*b*cos(f*x + e)^7 - 8*(8*a + b)*cos(f*x + e)^5 - 10*(8*a + b)*cos(f*x + e)^3 - 15
*(8*a + b)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 13.7463, size = 354, normalized size = 3.25 \begin{align*} \begin{cases} \frac{5 a x \sin ^{6}{\left (e + f x \right )}}{16} + \frac{15 a x \sin ^{4}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{16} + \frac{15 a x \sin ^{2}{\left (e + f x \right )} \cos ^{4}{\left (e + f x \right )}}{16} + \frac{5 a x \cos ^{6}{\left (e + f x \right )}}{16} + \frac{5 a \sin ^{5}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{16 f} + \frac{5 a \sin ^{3}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{6 f} + \frac{11 a \sin{\left (e + f x \right )} \cos ^{5}{\left (e + f x \right )}}{16 f} + \frac{5 b x \sin ^{8}{\left (e + f x \right )}}{128} + \frac{5 b x \sin ^{6}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{32} + \frac{15 b x \sin ^{4}{\left (e + f x \right )} \cos ^{4}{\left (e + f x \right )}}{64} + \frac{5 b x \sin ^{2}{\left (e + f x \right )} \cos ^{6}{\left (e + f x \right )}}{32} + \frac{5 b x \cos ^{8}{\left (e + f x \right )}}{128} + \frac{5 b \sin ^{7}{\left (e + f x \right )} \cos{\left (e + f x \right )}}{128 f} + \frac{55 b \sin ^{5}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{384 f} + \frac{73 b \sin ^{3}{\left (e + f x \right )} \cos ^{5}{\left (e + f x \right )}}{384 f} - \frac{5 b \sin{\left (e + f x \right )} \cos ^{7}{\left (e + f x \right )}}{128 f} & \text{for}\: f \neq 0 \\x \left (a + b \sin ^{2}{\left (e \right )}\right ) \cos ^{6}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**6*(a+b*sin(f*x+e)**2),x)

[Out]

Piecewise((5*a*x*sin(e + f*x)**6/16 + 15*a*x*sin(e + f*x)**4*cos(e + f*x)**2/16 + 15*a*x*sin(e + f*x)**2*cos(e
 + f*x)**4/16 + 5*a*x*cos(e + f*x)**6/16 + 5*a*sin(e + f*x)**5*cos(e + f*x)/(16*f) + 5*a*sin(e + f*x)**3*cos(e
 + f*x)**3/(6*f) + 11*a*sin(e + f*x)*cos(e + f*x)**5/(16*f) + 5*b*x*sin(e + f*x)**8/128 + 5*b*x*sin(e + f*x)**
6*cos(e + f*x)**2/32 + 15*b*x*sin(e + f*x)**4*cos(e + f*x)**4/64 + 5*b*x*sin(e + f*x)**2*cos(e + f*x)**6/32 +
5*b*x*cos(e + f*x)**8/128 + 5*b*sin(e + f*x)**7*cos(e + f*x)/(128*f) + 55*b*sin(e + f*x)**5*cos(e + f*x)**3/(3
84*f) + 73*b*sin(e + f*x)**3*cos(e + f*x)**5/(384*f) - 5*b*sin(e + f*x)*cos(e + f*x)**7/(128*f), Ne(f, 0)), (x
*(a + b*sin(e)**2)*cos(e)**6, True))

________________________________________________________________________________________

Giac [A]  time = 1.13745, size = 117, normalized size = 1.07 \begin{align*} \frac{5}{128} \,{\left (8 \, a + b\right )} x - \frac{b \sin \left (8 \, f x + 8 \, e\right )}{1024 \, f} + \frac{{\left (a - b\right )} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac{{\left (6 \, a - b\right )} \sin \left (4 \, f x + 4 \, e\right )}{128 \, f} + \frac{{\left (15 \, a + b\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^6*(a+b*sin(f*x+e)^2),x, algorithm="giac")

[Out]

5/128*(8*a + b)*x - 1/1024*b*sin(8*f*x + 8*e)/f + 1/192*(a - b)*sin(6*f*x + 6*e)/f + 1/128*(6*a - b)*sin(4*f*x
 + 4*e)/f + 1/64*(15*a + b)*sin(2*f*x + 2*e)/f